<template>
	<view class="content">
		<view class="header">
			<image src="@/static/baizuo.png" mode="" style="width: 45upx;height: 45upx;" @click="back"></image>
			<!-- <text style="font-size: 40upx;margin-left: 30%;color: #fff;">话题视频</text> -->
		</view>
		<videonue v-if="isFlag" :cateId='cateId' @setFollow='setFollow' :area='location' :isFlag='isFlag'
					:allList='videoArray' :playIndex='playIndex' @updateList='bottomScroll' :videoArray='videoArray'
					@func="getMsgFormSon" :isshow='true'  :useid="useid"></videonue>
	</view>
</template>

<script>
	import videoList from "../../components/videoList/likeList.vue"
	import videoop from "../../components/videoList/viedeop.vue"
	import * as utils from '../../utils/index.js'
	import videonue from '../../components/video/videonuew.nvue'
	export default {
		data(){
			return {
				actIndex:-1,
				cateId: 0,
				location:{},	
				page:1,
				List:[],
				isFlag:true,
				playIndex: 0,
				loadingType:0,
				isBoolean: 1,
				videoArray:[],
				shop_id:'',
				useid:''
			}
		},
		onLoad(options) {
			console.log("看这里找到我",JSON.parse(options.shipin))
			this.page = options.page
			this.shop_id = options.shpo_id
			this.playIndex = options.index
			this.videoArray = JSON.parse(options.shipin)
			this.useid = options.useid
		},
		mounted() {
			this.getList(1)
		},
		methods:{
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			setFollow(id){
				console.log()
				this.List = this.List.map(item=>{
					if(item.shop_id == id){
						console.log(item)
						item.is_follow = item.is_follow == 0 ? 1:0
					}
					return item
				})
			},
			getList(page){
				
				// uni.request({
				// 	url: 'https://dsx.cdzer.com/api/MemberInfo/user_video', //仅为示例，并非真实接口地址。
				// 	data: {
				// 		uid: this.shop_id,
				// 		page: this.page
				// 	},
				// 	header: {
				// 		'content-type': 'application/x-www-form-urlencoded',
				// 	},
				// 	method: 'POST',
				// 	success: (res) => {
				// 		console.log(res, "上传视频")
				// 		if (res.data.status == 400) {
				// 			this.works = []
				// 		} else {
				// 			// this.works = res.data.data.video_list
				// 					 this.List = res.data.data.video_list
				// 					 this.videoArray =res.data.data.video_list
				// 		}
				// 	}
				// });
				// this.$http.shop_video({
				// 	 shop_id:this.shop_id,
				// 	 page:this.page,				 
				// }).then(res=>{
				// 	 if(res.status == 200){
				// 		 this.List = res.data.video_list
				// 		 this.videoArray = this.videoArray.concat(res.data.video_list)
				// 		 // ++this.page
						
				// 		 this.isUpdate = true
				// 	 }
				// })
			},
			bottomScroll(){
					this.loadingType = 1
					// this.getList(++this.page)
			}
		},
		components: {
			videoList,
			videoop,
				videonue
		},
	}
</script>

<style lang="scss" scoped>
	.header{
		position: fixed;
		// background-color: #000000;
		height: 110upx;
		width: 100%;
		top: 0;
		left: 0;
		display: flex;
		z-index: 100;
		align-items: center;
		padding-left: 30upx;
	}
	.content {
		width: 100%;
		height: 100%;
		overflow: hidden;
		color: #3F536E;
		background-color: #000000;
		.title {
			margin: 0 20rpx;
		}
	}
	.scroll_box{
		height: calc(100vh - 288rpx);
		// margin-top: ;
		width: 94vw;
		margin: 288rpx 3vw;
	}
</style>
